<html>
<head>
<title>File Source for Excel2007.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPExcel_Reader</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_PHPExcel_Reader.html" class="menu">class tree: PHPExcel_Reader</a> ]
		  [ <a href="../elementindex_PHPExcel_Reader.html" class="menu">index: PHPExcel_Reader</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
      <b>Packages:</b><br />
              <a href="../li_PHPExcel.html">PHPExcel</a><br />
              <a href="../li_PHPExcel_Cell.html">PHPExcel_Cell</a><br />
              <a href="../li_PHPExcel_Reader.html">PHPExcel_Reader</a><br />
              <a href="../li_PHPExcel_Shared.html">PHPExcel_Shared</a><br />
              <a href="../li_PHPExcel_Style.html">PHPExcel_Style</a><br />
              <a href="../li_PHPExcel_Worksheet.html">PHPExcel_Worksheet</a><br />
              <a href="../li_PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a><br />
              <a href="../li_PHPExcel_Writer.html">PHPExcel_Writer</a><br />
              <a href="../li_PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a><br />
            <br /><br />
                  
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file Excel2007.php</h1>
<p>Documentation is available at <a href="../PHPExcel_Reader/_Classes_PHPExcel_Reader_Excel2007_php.html">Excel2007.php</a></p>
<div class="php">
<div class="listing"><pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc"> * PHPExcel</span></li>
<li><a name="a4"></a><span class="src-doc"> *</span></li>
<li><a name="a5"></a><span class="src-doc"> * Copyright (c) 2006 - 2007 PHPExcel, Maarten Balliauw</span></li>
<li><a name="a6"></a><span class="src-doc"> *</span></li>
<li><a name="a7"></a><span class="src-doc"> * This library is free software; you can redistribute it and/or</span></li>
<li><a name="a8"></a><span class="src-doc"> * modify it under the terms of the GNU Lesser General Public</span></li>
<li><a name="a9"></a><span class="src-doc"> * License as published by the Free Software Foundation; either</span></li>
<li><a name="a10"></a><span class="src-doc"> * version 2.1 of the License, or (at your option) any later version.</span></li>
<li><a name="a11"></a><span class="src-doc"> * </span></li>
<li><a name="a12"></a><span class="src-doc"> * This library is distributed in the hope that it will be useful,</span></li>
<li><a name="a13"></a><span class="src-doc"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></li>
<li><a name="a14"></a><span class="src-doc"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span></li>
<li><a name="a15"></a><span class="src-doc"> * Lesser General Public License for more details.</span></li>
<li><a name="a16"></a><span class="src-doc"> * </span></li>
<li><a name="a17"></a><span class="src-doc"> * You should have received a copy of the GNU Lesser General Public</span></li>
<li><a name="a18"></a><span class="src-doc"> * License along with this library; if not, write to the Free Software</span></li>
<li><a name="a19"></a><span class="src-doc"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA</span></li>
<li><a name="a20"></a><span class="src-doc"> *</span></li>
<li><a name="a21"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@category</span><span class="src-doc">   PHPExcel</span></li>
<li><a name="a22"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc">    PHPExcel_Reader</span></li>
<li><a name="a23"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc">  Copyright (c) 2006 - 2007 PHPExcel (http://www.codeplex.com/PHPExcel)</span></li>
<li><a name="a24"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc">    http://www.gnu.org/licenses/lgpl.txt    LGPL</span></li>
<li><a name="a25"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc">    ##VERSION##, ##DATE##</span></li>
<li><a name="a26"></a><span class="src-doc"> */</span></li>
<li><a name="a27"></a>&nbsp;</li>
<li><a name="a28"></a>&nbsp;</li>
<li><a name="a29"></a><span class="src-doc">/** PHPExcel */</span></li>
<li><a name="a29"></a>&nbsp;</li>
<li><a name="a30"></a><span class="src-inc">require_once </span><span class="src-str">'PHPExcel.php'</span><span class="src-sym">;</span></li>
<li><a name="a31"></a>&nbsp;</li>
<li><a name="a32"></a><span class="src-doc">/** PHPExcel_Reader_IReader */</span></li>
<li><a name="a32"></a>&nbsp;</li>
<li><a name="a33"></a><span class="src-inc">require_once </span><span class="src-str">'PHPExcel/Reader/IReader.php'</span><span class="src-sym">;</span></li>
<li><a name="a34"></a>&nbsp;</li>
<li><a name="a35"></a>&nbsp;</li>
<li><a name="a36"></a><span class="src-doc">/**</span></li>
<li><a name="a37"></a><span class="src-doc"> * PHPExcel_Reader_Excel2007</span></li>
<li><a name="a38"></a><span class="src-doc"> *</span></li>
<li><a name="a39"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@category</span><span class="src-doc">   PHPExcel</span></li>
<li><a name="a40"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc">    PHPExcel_Reader</span></li>
<li><a name="a41"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc">  Copyright (c) 2006 - 2007 PHPExcel (http://www.codeplex.com/PHPExcel)</span></li>
<li><a name="a42"></a><span class="src-doc"> */</span></li>
<li><a name="a43"></a><span class="src-key">class </span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a> <span class="src-key">implements </span><span class="src-id">PHPExcel_Reader_IReader</span></li>
<li><a name="a44"></a><span class="src-sym">{</span></li>
<li><a name="a45"></a>    <span class="src-doc">/**</span></li>
<li><a name="a46"></a><span class="src-doc">     * Loads PHPExcel from file</span></li>
<li><a name="a47"></a><span class="src-doc">     *</span></li>
<li><a name="a48"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@param </span><span class="src-doc">    </span><span class="src-doc-type">string </span><span class="src-doc">        </span><span class="src-doc-var">$pFilename </span></li>
<li><a name="a49"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@throws</span><span class="src-doc">     Exception</span></li>
<li><a name="a50"></a><span class="src-doc">     */    </span></li>
<li><a name="a51"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#methodload">load</a><span class="src-sym">(</span><span class="src-var">$pFilename</span><span class="src-sym">)</span></li>
<li><a name="a52"></a>    <span class="src-sym">{</span></li>
<li><a name="a53"></a>        <span class="src-comm">// Check if file exists</span></li>
<li><a name="a54"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-var">$pFilename</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a55"></a>            throw <span class="src-key">new </span><span class="src-id">Exception</span><span class="src-sym">(</span><span class="src-str">&quot;Could not open &quot; </span>. <span class="src-var">$pFilename </span>. <span class="src-str">&quot; for reading! File does not exist.&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a56"></a>        <span class="src-sym">}</span></li>
<li><a name="a57"></a>            </li>
<li><a name="a58"></a>        <span class="src-comm">// Initialisations</span></li>
<li><a name="a59"></a>        <span class="src-var">$excel </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPExcel/PHPExcel.html">PHPExcel</a></span><span class="src-sym">;</span></li>
<li><a name="a60"></a>        <span class="src-var">$excel</span><span class="src-sym">-&gt;</span><span class="src-id">removeSheetByIndex</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a61"></a>        </li>
<li><a name="a62"></a>        <span class="src-var">$rels </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-id">_rels</span>/.<span class="src-id">rels</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/package/2006/relationships&quot;);</span></li>
<li><a name="a63"></a>        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$rels</span><span class="src-sym">-&gt;</span><span class="src-id">Relationship </span><span class="src-key">as </span><span class="src-var">$rel</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a64"></a>            <span class="src-key">switch </span><span class="src-sym">(</span><span class="src-var">$rel</span><span class="src-sym">[</span><span class="src-str">&quot;Type&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a65"></a>                <span class="src-key">case </span><span class="src-str">&quot;http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties&quot;</span>:</li>
<li><a name="a66"></a>                    <span class="src-var">$xmlCore </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$rel</span><span class="src-sym">[</span><span class="src-id">Target</span><span class="src-sym">]</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a67"></a>                    <span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;dc&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://purl.org/dc/elements/1.1/&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a68"></a>                    <span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;dcterms&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://purl.org/dc/terms/&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a69"></a>                    <span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;cp&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://schemas.openxmlformats.org/package/2006/metadata/core-properties&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a70"></a>                    <span class="src-var">$docProps </span>= <span class="src-var">$excel</span><span class="src-sym">-&gt;</span><span class="src-id">getProperties</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a71"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setCreator</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dc:creator&quot;</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a72"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setLastModifiedBy</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;cp:lastModifiedBy&quot;</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a73"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setCreated</span><span class="src-sym">(</span><a href="http://www.php.net/strtotime">strtotime</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dcterms:created&quot;</span><span class="src-sym">))))</span><span class="src-sym">; </span><span class="src-comm">//! respect xsi:type</span></li>
<li><a name="a74"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setModified</span><span class="src-sym">(</span><a href="http://www.php.net/strtotime">strtotime</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dcterms:modified&quot;</span><span class="src-sym">))))</span><span class="src-sym">; </span><span class="src-comm">//! respect xsi:type</span></li>
<li><a name="a75"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setTitle</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dc:title&quot;</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a76"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setDescription</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dc:description&quot;</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a77"></a>                    <span class="src-var">$docProps</span><span class="src-sym">-&gt;</span><span class="src-id">setSubject</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$xmlCore</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;dc:subject&quot;</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a78"></a>                <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a79"></a>                </li>
<li><a name="a80"></a>                <span class="src-key">case </span><span class="src-str">&quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument&quot;</span>:</li>
<li><a name="a81"></a>                    <span class="src-var">$dir </span>= <a href="http://www.php.net/dirname">dirname</a><span class="src-sym">(</span><span class="src-var">$rel</span><span class="src-sym">[</span><span class="src-str">&quot;Target&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a82"></a>                    <span class="src-var">$relsWorkbook </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$dir</span>/<span class="src-id">_rels</span>/</span><span class="src-str">&quot; </span>. <a href="http://www.php.net/basename">basename</a><span class="src-sym">(</span><span class="src-var">$rel</span><span class="src-sym">[</span><span class="src-str">&quot;Target&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span>. <span class="src-str">&quot;.rels&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/package/2006/relationships&quot;);</span></li>
<li><a name="a83"></a>                    <span class="src-var">$relsWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;rel&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://schemas.openxmlformats.org/package/2006/relationships&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a84"></a>                    </li>
<li><a name="a85"></a>                    <span class="src-var">$sharedStrings </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a86"></a>                    <span class="src-var">$xpath </span>= <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$relsWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings']&quot;</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a87"></a>                    <span class="src-var">$xmlStrings </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$dir</span>/<span class="src-var">$xpath</span><span class="src-sym">[</span><span class="src-id">Target</span><span class="src-sym">]</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;);</span></li>
<li><a name="a88"></a>                    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlStrings</span><span class="src-sym">-&gt;</span><span class="src-id">si </span><span class="src-key">as </span><span class="src-var">$val</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a89"></a>                        <span class="src-var">$sharedStrings</span><span class="src-sym">[</span><span class="src-sym">] </span>= (string) <span class="src-var">$val</span><span class="src-sym">-&gt;</span><span class="src-id">t</span><span class="src-sym">;</span></li>
<li><a name="a90"></a>                    <span class="src-sym">}</span></li>
<li><a name="a91"></a>                    </li>
<li><a name="a92"></a>                    <span class="src-var">$worksheets </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a93"></a>                    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$relsWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">Relationship </span><span class="src-key">as </span><span class="src-var">$ele</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a94"></a>                        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$ele</span><span class="src-sym">[</span><span class="src-str">&quot;Type&quot;</span><span class="src-sym">] </span>== <span class="src-str">&quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a95"></a>                            <span class="src-var">$worksheets</span><span class="src-sym">[</span>(string) <span class="src-var">$ele</span><span class="src-sym">[</span><span class="src-str">&quot;Id&quot;</span><span class="src-sym">]] </span>= <span class="src-var">$ele</span><span class="src-sym">[</span><span class="src-str">&quot;Target&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a96"></a>                        <span class="src-sym">}</span></li>
<li><a name="a97"></a>                    <span class="src-sym">}</span></li>
<li><a name="a98"></a>                    </li>
<li><a name="a99"></a>                    <span class="src-var">$styles </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a100"></a>                    <span class="src-var">$xpath </span>= <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$relsWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']&quot;</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a101"></a>                    <span class="src-var">$xmlStyles </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$dir</span>/<span class="src-var">$xpath</span><span class="src-sym">[</span><span class="src-id">Target</span><span class="src-sym">]</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;);</span></li>
<li><a name="a102"></a>                    <span class="src-var">$numFmts </span>= <span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">numFmts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a103"></a>                    <span class="src-var">$numFmts</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;sml&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a104"></a>                    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">cellStyles</span><span class="src-sym">-&gt;</span><span class="src-id">cellStyle </span><span class="src-key">as </span><span class="src-var">$style</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a105"></a>                        <span class="src-var">$xf </span>= <span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">cellXfs</span><span class="src-sym">-&gt;</span><span class="src-id">xf</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">[</span><span class="src-str">&quot;xfId&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a106"></a>                        <span class="src-var">$styles</span><span class="src-sym">[</span><span class="src-sym">] </span>= (object) <span class="src-key">array</span><span class="src-sym">(</span></li>
<li><a name="a107"></a>                            <span class="src-str">&quot;numFmt&quot; </span>=&gt; <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$numFmts</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">sml</span>:<span class="src-id">numFmt</span><span class="src-sym">[</span>@<span class="src-id">numFmtId</span>=<span class="src-var">$xf</span><span class="src-sym">[</span><span class="src-id">numFmtId</span><span class="src-sym">]]</span></span><span class="src-str">&quot;</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a108"></a>                            <span class="src-str">&quot;font&quot; </span>=&gt; <span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">fonts</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$xf</span><span class="src-sym">[</span><span class="src-str">&quot;fontId&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a109"></a>                            <span class="src-str">&quot;fill&quot; </span>=&gt; <span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">fills</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$xf</span><span class="src-sym">[</span><span class="src-str">&quot;fillId&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a110"></a>                            <span class="src-str">&quot;border&quot; </span>=&gt; <span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">borders</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$xf</span><span class="src-sym">[</span><span class="src-str">&quot;borderId&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a111"></a>                            <span class="src-str">&quot;alignment&quot; </span>=&gt; <span class="src-var">$xf</span><span class="src-sym">-&gt;</span><span class="src-id">alignment</span><span class="src-sym">,</span></li>
<li><a name="a112"></a>                        <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a113"></a>                    <span class="src-sym">}</span></li>
<li><a name="a114"></a>                    </li>
<li><a name="a115"></a>                    <span class="src-var">$dxfs </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a116"></a>                    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlStyles</span><span class="src-sym">-&gt;</span><span class="src-id">dxfs</span><span class="src-sym">-&gt;</span><span class="src-id">dxf </span><span class="src-key">as </span><span class="src-var">$dxf</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a117"></a>                        <span class="src-var">$style </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Style.html">PHPExcel_Style</a></span><span class="src-sym">;</span></li>
<li><a name="a118"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readStyle">_readStyle</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">, </span><span class="src-var">$dxf</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a119"></a>                        <span class="src-var">$dxfs</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$style</span><span class="src-sym">;</span></li>
<li><a name="a120"></a>                    <span class="src-sym">}</span></li>
<li><a name="a121"></a>                    </li>
<li><a name="a122"></a>                    <span class="src-var">$xmlWorkbook </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$rel</span><span class="src-sym">[</span><span class="src-id">Target</span><span class="src-sym">]</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;);</span></li>
<li><a name="a123"></a>                    <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">sheets</span><span class="src-sym">-&gt;</span><span class="src-id">sheet </span><span class="src-key">as </span><span class="src-var">$eleSheet</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a124"></a>                        <span class="src-var">$docSheet </span>= <span class="src-var">$excel</span><span class="src-sym">-&gt;</span><span class="src-id">createSheet</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a125"></a>                        <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">setTitle</span><span class="src-sym">(</span>(string) <span class="src-var">$eleSheet</span><span class="src-sym">[</span><span class="src-str">&quot;name&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a126"></a>                        <span class="src-var">$fileWorkheet </span>= <span class="src-var">$worksheets</span><span class="src-sym">[</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$eleSheet</span><span class="src-sym">-&gt;</span><span class="src-id">attributes</span><span class="src-sym">(</span><span class="src-str">&quot;http://schemas.openxmlformats.org/officeDocument/2006/relationships&quot;</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">&quot;id&quot;</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a127"></a>                        <span class="src-var">$xmlSheet </span>= <a href="http://www.php.net/simplexml_load_file">simplexml_load_file</a><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str"><span class="src-id">zip</span>://<span class="src-var">$pFilename</span>#<span class="src-var">$dir</span>/<span class="src-var">$fileWorkheet</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">//~ http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;);</span></li>
<li><a name="a128"></a>                        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">cols</span><span class="src-sym">-&gt;</span><span class="src-id">col </span><span class="src-key">as </span><span class="src-var">$col</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a129"></a>                            <span class="src-key">for </span><span class="src-sym">(</span><span class="src-var">$i</span>=<a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$col</span><span class="src-sym">[</span><span class="src-str">&quot;min&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">; </span><span class="src-var">$i </span>&lt; <a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$col</span><span class="src-sym">[</span><span class="src-str">&quot;max&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-var">$i</span>++<span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a130"></a>                                <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimension</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPExcel/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">setWidth</span><span class="src-sym">(</span><span class="src-var">$col</span><span class="src-sym">[</span><span class="src-str">&quot;bestFit&quot;</span><span class="src-sym">] </span>? -<span class="src-num">1 </span>: <a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$col</span><span class="src-sym">[</span><span class="src-str">&quot;width&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a131"></a>                            <span class="src-sym">}</span></li>
<li><a name="a132"></a>                        <span class="src-sym">}</span></li>
<li><a name="a133"></a>                        </li>
<li><a name="a134"></a>                        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">sheetData</span><span class="src-sym">-&gt;</span><span class="src-id">row </span><span class="src-key">as </span><span class="src-var">$row</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a135"></a>                            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">&quot;ht&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a136"></a>                                <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">&quot;r&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">setRowHeight</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">[</span><span class="src-str">&quot;ht&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a137"></a>                            <span class="src-sym">}</span></li>
<li><a name="a138"></a>                            <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$row</span><span class="src-sym">-&gt;</span><span class="src-id">c </span><span class="src-key">as </span><span class="src-var">$c</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a139"></a>                                <span class="src-var">$r </span>= (string) <span class="src-var">$c</span><span class="src-sym">[</span><span class="src-str">&quot;r&quot;</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a140"></a>                                <span class="src-key">switch </span><span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">[</span><span class="src-str">&quot;t&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a141"></a>                                    <span class="src-key">case </span><span class="src-str">&quot;s&quot;</span>: <span class="src-var">$value </span>= <span class="src-var">$sharedStrings</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">-&gt;</span><span class="src-id">v</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a142"></a>                                    <span class="src-key">case </span><span class="src-str">&quot;b&quot;</span>: <span class="src-var">$value </span>= (bool) <span class="src-var">$c</span><span class="src-sym">-&gt;</span><span class="src-id">v</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a143"></a>                                    <span class="src-key">case </span><span class="src-str">&quot;str&quot;</span>: <span class="src-var">$value </span>= <span class="src-str">&quot;</span><span class="src-str">=<span class="src-var">$c</span><span class="src-sym">-&gt;</span><span class="src-id">f</span></span><span class="src-str">&quot;</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a144"></a>                                    <span class="src-key">case </span><span class="src-str">&quot;inlineStr&quot;</span>: <span class="src-var">$value </span>= (string) <span class="src-var">$c</span><span class="src-sym">-&gt;</span><span class="src-id">is</span><span class="src-sym">-&gt;</span><span class="src-id">t</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a145"></a>                                    <span class="src-key">default</span>: <span class="src-var">$value </span>= (string) <span class="src-var">$c</span><span class="src-sym">-&gt;</span><span class="src-id">v</span><span class="src-sym">; </span><span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a146"></a>                                <span class="src-sym">}</span></li>
<li><a name="a147"></a>                                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a148"></a>                                    <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">setCellValue</span><span class="src-sym">(</span><span class="src-var">$r</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a149"></a>                                <span class="src-sym">}</span></li>
<li><a name="a150"></a>                                <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">[</span><span class="src-str">&quot;s&quot;</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a151"></a>                                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readStyle">_readStyle</a><span class="src-sym">(</span><span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getStyle</span><span class="src-sym">(</span><span class="src-var">$r</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$styles</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$c</span><span class="src-sym">[</span><span class="src-str">&quot;s&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a152"></a>                                <span class="src-sym">}</span></li>
<li><a name="a153"></a>                            <span class="src-sym">}</span></li>
<li><a name="a154"></a>                        <span class="src-sym">}</span></li>
<li><a name="a155"></a>                        </li>
<li><a name="a156"></a>                        <span class="src-var">$conditionals </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a157"></a>                        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">conditionalFormatting </span><span class="src-key">as </span><span class="src-var">$conditional</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a158"></a>                            <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$conditional</span><span class="src-sym">-&gt;</span><span class="src-id">cfRule </span><span class="src-key">as </span><span class="src-var">$cfRule</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a159"></a>                                <span class="src-var">$conditionals</span><span class="src-sym">[</span>(string) <span class="src-var">$conditional</span><span class="src-sym">[</span><span class="src-str">&quot;sqref&quot;</span><span class="src-sym">]]</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$cfRule</span><span class="src-sym">[</span><span class="src-str">&quot;priority&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">] </span>= <span class="src-var">$cfRule</span><span class="src-sym">;</span></li>
<li><a name="a160"></a>                            <span class="src-sym">}</span></li>
<li><a name="a161"></a>                        <span class="src-sym">}</span></li>
<li><a name="a162"></a>                        <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$conditionals </span><span class="src-key">as </span><span class="src-var">$ref </span>=&gt; <span class="src-var">$cfRules</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a163"></a>                            <a href="http://www.php.net/ksort">ksort</a><span class="src-sym">(</span><span class="src-var">$cfRules</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a164"></a>                            <span class="src-var">$conditionalStyles </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a165"></a>                            <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$cfRules </span><span class="src-key">as </span><span class="src-var">$cfRule</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a166"></a>                                <span class="src-var">$objConditional </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPExcel_Style/PHPExcel_Style_Conditional.html">PHPExcel_Style_Conditional</a></span><span class="src-sym">;</span></li>
<li><a name="a167"></a>                                <span class="src-var">$objConditional</span><span class="src-sym">-&gt;</span><span class="src-id">setConditionType</span><span class="src-sym">(</span>(string) <span class="src-var">$cfRule</span><span class="src-sym">[</span><span class="src-str">&quot;type&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a168"></a>                                <span class="src-var">$objConditional</span><span class="src-sym">-&gt;</span><span class="src-id">setOperatorType</span><span class="src-sym">(</span>(string) <span class="src-var">$cfRule</span><span class="src-sym">[</span><span class="src-str">&quot;operator&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a169"></a>                                <span class="src-var">$objConditional</span><span class="src-sym">-&gt;</span><span class="src-id">setCondition</span><span class="src-sym">(</span>(string) <span class="src-var">$cfRule</span><span class="src-sym">-&gt;</span><span class="src-id">formula</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a170"></a>                                <span class="src-var">$objConditional</span><span class="src-sym">-&gt;</span><span class="src-id">setStyle</span><span class="src-sym">(</span><span class="src-var">$dxfs</span><span class="src-sym">[</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$cfRule</span><span class="src-sym">[</span><span class="src-str">&quot;dxfId&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a171"></a>                                <span class="src-var">$conditionalStyles</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$objConditional</span><span class="src-sym">;</span></li>
<li><a name="a172"></a>                            <span class="src-sym">}</span></li>
<li><a name="a173"></a>                            <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getStyle</span><span class="src-sym">(</span><span class="src-var">$ref</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setConditionalStyles</span><span class="src-sym">(</span><span class="src-var">$conditionalStyles</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a174"></a>                        <span class="src-sym">}</span></li>
<li><a name="a175"></a>                        </li>
<li><a name="a176"></a>                        <span class="src-var">$docPageMargins </span>= <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getPageMargins</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a177"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setLeft</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;left&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a178"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setRight</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;right&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a179"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setTop</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;top&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a180"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setBottom</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;bottom&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a181"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setHeader</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;header&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a182"></a>                        <span class="src-var">$docPageMargins</span><span class="src-sym">-&gt;</span><span class="src-id">setFooter</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageMargins</span><span class="src-sym">[</span><span class="src-str">&quot;footer&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a183"></a>                        </li>
<li><a name="a184"></a>                        <span class="src-var">$docPageSetup </span>= <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getPageSetup</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a185"></a>                        <span class="src-var">$docPageSetup</span><span class="src-sym">-&gt;</span><span class="src-id">setOrientation</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageSetup</span><span class="src-sym">[</span><span class="src-str">&quot;orientation&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a186"></a>                        <span class="src-var">$docPageSetup</span><span class="src-sym">-&gt;</span><span class="src-id">setPaperSize</span><span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">pageSetup</span><span class="src-sym">[</span><span class="src-str">&quot;paperSize&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a187"></a>                        </li>
<li><a name="a188"></a>                        <span class="src-var">$docHeaderFooter </span>= <span class="src-var">$docSheet</span><span class="src-sym">-&gt;</span><span class="src-id">getHeaderFooter</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a189"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setDifferentOddEven</span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">[</span><span class="src-str">&quot;differentOddEven&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a190"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setDifferentFirst</span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">[</span><span class="src-str">&quot;differentFirst&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a191"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setScaleWithDocument</span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">[</span><span class="src-str">&quot;scaleWithDoc&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a192"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setAlignWithMargins</span><span class="src-sym">(</span><span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">[</span><span class="src-str">&quot;alignWithMargins&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a193"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setOddHeader</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">oddHeader</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a194"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setOddFooter</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">oddFooter</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a195"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setEvenHeader</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">evenHeader</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a196"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setEvenFooter</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">evenFooter</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a197"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setFirstHeader</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">firstHeader</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a198"></a>                        <span class="src-var">$docHeaderFooter</span><span class="src-sym">-&gt;</span><span class="src-id">setFirstFooter</span><span class="src-sym">(</span>(string) <span class="src-var">$xmlSheet</span><span class="src-sym">-&gt;</span><span class="src-id">headerFooter</span><span class="src-sym">-&gt;</span><span class="src-id">firstFooter</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a199"></a>                        </li>
<li><a name="a200"></a>                        <span class="src-comm">/* //! drawing</span></li>
<li><a name="a201"></a><span class="src-comm">$objDrawing = new PHPExcel_Worksheet_Drawing();</span></li>
<li><a name="a202"></a><span class="src-comm">$objDrawing-&gt;setName('Paid');</span></li>
<li><a name="a203"></a><span class="src-comm">$objDrawing-&gt;setDescription('Paid');</span></li>
<li><a name="a204"></a><span class="src-comm">$objDrawing-&gt;setPath('./images/paid.png');</span></li>
<li><a name="a205"></a><span class="src-comm">$objDrawing-&gt;setCoordinates('B15');</span></li>
<li><a name="a206"></a><span class="src-comm">$objDrawing-&gt;setOffsetX(110);</span></li>
<li><a name="a207"></a><span class="src-comm">$objDrawing-&gt;setRotation(25);</span></li>
<li><a name="a208"></a><span class="src-comm">$objDrawing-&gt;setWorksheet($objPHPExcel-&gt;getActiveSheet());</span></li>
<li><a name="a209"></a><span class="src-comm">                        */</span></li>
<li><a name="a210"></a>                    <span class="src-sym">}</span></li>
<li><a name="a211"></a>                    </li>
<li><a name="a212"></a>                    <span class="src-var">$excel</span><span class="src-sym">-&gt;</span><span class="src-id">setActiveSheetIndex</span><span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$xmlWorkbook</span><span class="src-sym">-&gt;</span><span class="src-id">bookView</span><span class="src-sym">-&gt;</span><span class="src-id">workbookView</span><span class="src-sym">[</span><span class="src-str">&quot;activeTab&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a213"></a>                <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a214"></a>            <span class="src-sym">}</span></li>
<li><a name="a215"></a>        <span class="src-sym">}</span></li>
<li><a name="a216"></a>        </li>
<li><a name="a217"></a>        <span class="src-key">return </span><span class="src-var">$excel</span><span class="src-sym">;</span></li>
<li><a name="a218"></a>    <span class="src-sym">}</span></li>
<li><a name="a219"></a>    </li>
<li><a name="a220"></a>    <span class="src-key">private </span><span class="src-key">function </span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readStyle">_readStyle</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a221"></a>        <span class="src-comm">// format code</span></li>
<li><a name="a222"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getNumberFormat</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setFormatCode</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">numFmt</span><span class="src-sym">[</span><span class="src-str">&quot;formatCode&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a223"></a>        </li>
<li><a name="a224"></a>        <span class="src-comm">// font</span></li>
<li><a name="a225"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setName</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">name</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a226"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setSize</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">sz</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a227"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setBold</span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">b</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a228"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setItalic</span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">i</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a229"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setStriketrough</span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">strike</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a230"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">color</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a231"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setUnderline</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">font</span><span class="src-sym">-&gt;</span><span class="src-id">u</span><span class="src-sym">[</span><span class="src-str">&quot;val&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a232"></a>        </li>
<li><a name="a233"></a>        <span class="src-comm">// fill</span></li>
<li><a name="a234"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">gradientFill</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a235"></a>            <span class="src-var">$gradientFill </span>= <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">gradientFill</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a236"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setFillType</span><span class="src-sym">(</span>(string) <span class="src-var">$gradientFill</span><span class="src-sym">[</span><span class="src-str">&quot;type&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a237"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setRotation</span><span class="src-sym">(</span><a href="http://www.php.net/floatval">floatval</a><span class="src-sym">(</span><span class="src-var">$gradientFill</span><span class="src-sym">[</span><span class="src-str">&quot;degree&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a238"></a>            <span class="src-var">$gradientFill</span><span class="src-sym">-&gt;</span><span class="src-id">registerXPathNamespace</span><span class="src-sym">(</span><span class="src-str">&quot;sml&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;http://schemas.openxmlformats.org/spreadsheetml/2006/main&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a239"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getStartColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$gradientFill</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;sml:stop[@position=0]&quot;</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">color</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a240"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getEndColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">array_item</span><span class="src-sym">(</span><span class="src-var">$gradientFill</span><span class="src-sym">-&gt;</span><span class="src-id">xpath</span><span class="src-sym">(</span><span class="src-str">&quot;sml:stop[@position=1]&quot;</span><span class="src-sym">))</span><span class="src-sym">-&gt;</span><span class="src-id">color</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a241"></a>        <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a242"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setFillType</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">[</span><span class="src-str">&quot;patternType&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a243"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">-&gt;</span><span class="src-id">fgColor</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a244"></a>                <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getStartColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">-&gt;</span><span class="src-id">fgColor</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a245"></a>            <span class="src-sym">}</span></li>
<li><a name="a246"></a>            <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">-&gt;</span><span class="src-id">bgColor</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a247"></a>                <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getFill</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getEndColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">fill</span><span class="src-sym">-&gt;</span><span class="src-id">patternFill</span><span class="src-sym">-&gt;</span><span class="src-id">bgColor</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a248"></a>            <span class="src-sym">}</span></li>
<li><a name="a249"></a>        <span class="src-sym">}</span></li>
<li><a name="a250"></a>        </li>
<li><a name="a251"></a>        <span class="src-comm">// border</span></li>
<li><a name="a252"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">[</span><span class="src-str">&quot;diagonalUp&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a253"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setDiagonalDirection</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPExcel_Style/PHPExcel_Style_Borders.html">PHPExcel_Style_Borders</a></span><span class="src-sym">::</span><span class="src-id">DIAGONAL_UP</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a254"></a>        <span class="src-sym">} </span><span class="src-key">elseif </span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">[</span><span class="src-str">&quot;diagonalDown&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a255"></a>            <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setDiagonalDirection</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPExcel_Style/PHPExcel_Style_Borders.html">PHPExcel_Style_Borders</a></span><span class="src-sym">::</span><span class="src-id">DIAGONAL_DOWN</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a256"></a>        <span class="src-sym">}</span></li>
<li><a name="a257"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setOutline</span><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">[</span><span class="src-str">&quot;outline&quot;</span><span class="src-sym">] </span>== <span class="src-str">'true'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a258"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getLeft</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">left</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a259"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getRight</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">right</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a260"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getTop</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">top</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a261"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getBottom</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">bottom</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a262"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getDiagonal</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">diagonal</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a263"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getVertical</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">vertical</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a264"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getBorders</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getHorizontal</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">border</span><span class="src-sym">-&gt;</span><span class="src-id">horizontal</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a265"></a>        </li>
<li><a name="a266"></a>        <span class="src-comm">// alignment</span></li>
<li><a name="a267"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getAlignment</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setHorizontal</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">alignment</span><span class="src-sym">[</span><span class="src-str">&quot;horizontal&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a268"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getAlignment</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setVertical</span><span class="src-sym">(</span>(string) <span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">alignment</span><span class="src-sym">[</span><span class="src-str">&quot;vertical&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a269"></a>        <span class="src-var">$docStyle</span><span class="src-sym">-&gt;</span><span class="src-id">getAlignment</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setTextRotation</span><span class="src-sym">(</span><a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><span class="src-var">$style</span><span class="src-sym">-&gt;</span><span class="src-id">alignment</span><span class="src-sym">[</span><span class="src-str">&quot;textRotation&quot;</span><span class="src-sym">]</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a270"></a>    <span class="src-sym">}</span></li>
<li><a name="a271"></a>    </li>
<li><a name="a272"></a>    <span class="src-key">private </span><span class="src-key">function </span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#method_readBorder">_readBorder</a><span class="src-sym">(</span><span class="src-var">$docBorder</span><span class="src-sym">, </span><span class="src-var">$eleBorder</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a273"></a>        <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$eleBorder</span><span class="src-sym">[</span><span class="src-str">&quot;style&quot;</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a274"></a>            <span class="src-var">$docBorder</span><span class="src-sym">-&gt;</span><span class="src-id">setBorderStyle</span><span class="src-sym">(</span>(string) <span class="src-var">$eleBorder</span><span class="src-sym">[</span><span class="src-str">&quot;style&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a275"></a>        <span class="src-sym">}</span></li>
<li><a name="a276"></a>        <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$eleBorder</span><span class="src-sym">-&gt;</span><span class="src-id">color</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a277"></a>            <span class="src-var">$docBorder</span><span class="src-sym">-&gt;</span><span class="src-id">getColor</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">setARGB</span><span class="src-sym">(</span>(string) <span class="src-var">$eleBorder</span><span class="src-sym">-&gt;</span><span class="src-id">color</span><span class="src-sym">[</span><span class="src-str">&quot;rgb&quot;</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a278"></a>        <span class="src-sym">}</span></li>
<li><a name="a279"></a>    <span class="src-sym">}</span></li>
<li><a name="a280"></a>&nbsp;</li>
<li><a name="a281"></a>    <span class="src-key">private </span><span class="src-key">static </span><span class="src-key">function </span><a href="../PHPExcel_Reader/PHPExcel_Reader_Excel2007.html#methodarray_item">array_item</a><span class="src-sym">(</span><span class="src-var">$array</span><span class="src-sym">, </span><span class="src-var">$key </span>= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a282"></a>        <span class="src-key">return </span><span class="src-var">$array</span><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a283"></a>    <span class="src-sym">}</span></li>
<li><a name="a284"></a>    </li>
<li><a name="a285"></a><span class="src-sym">}</span></li>
</ol></pre></div>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Mon, 23 Apr 2007 12:52:34 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>